package com.lottery.ruok.lottrey.retrofitModule.response;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ASUS on 2017/8/21.
 */

public class LiuhecaiTrendResponse implements Parcelable{

    /**
     * id : 2154
     * issue_no : 2017078
     * prize_num : 30,07,02,08,10,06,28
     * issue_date : 1499270400
     * created_at : 2017-07-06 21:36:43
     * missing : null
     * attached : {"color":["red","red","red","red","blue","green","green"],"sx":["龙","兔","猴","虎","鼠","龙","马"]}
     * ext : [91,"单","小","红波","双","大","和双","和大","尾大"]
     */

    private String id;
    private String issue_no;
    private String prize_num;
    private String issue_date;
    private String created_at;
    private AttachedBean attached;
    private List<String> ext;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIssue_no() {
        return issue_no;
    }

    public void setIssue_no(String issue_no) {
        this.issue_no = issue_no;
    }

    public String getPrize_num() {
        return prize_num;
    }

    public void setPrize_num(String prize_num) {
        this.prize_num = prize_num;
    }

    public String getIssue_date() {
        return issue_date;
    }

    public void setIssue_date(String issue_date) {
        this.issue_date = issue_date;
    }

    public String getCreated_at() {
        return created_at;
    }

    public void setCreated_at(String created_at) {
        this.created_at = created_at;
    }

    public AttachedBean getAttached() {
        return attached;
    }

    public void setAttached(AttachedBean attached) {
        this.attached = attached;
    }

    public List<String> getExt() {
        return ext;
    }

    public void setExt(List<String> ext) {
        this.ext = ext;
    }

    public static class AttachedBean implements Parcelable{
        private List<String> color;
        private List<String> sx;

        public List<String> getColor() {
            return color;
        }

        public void setColor(List<String> color) {
            this.color = color;
        }

        public List<String> getSx() {
            return sx;
        }

        public void setSx(List<String> sx) {
            this.sx = sx;
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeStringList(this.color);
            dest.writeStringList(this.sx);
        }

        public AttachedBean() {
        }

        protected AttachedBean(Parcel in) {
            this.color = in.createStringArrayList();
            this.sx = in.createStringArrayList();
        }

        public static final Creator<AttachedBean> CREATOR = new Creator<AttachedBean>() {
            public AttachedBean createFromParcel(Parcel source) {
                return new AttachedBean(source);
            }

            public AttachedBean[] newArray(int size) {
                return new AttachedBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.issue_no);
        dest.writeString(this.prize_num);
        dest.writeString(this.issue_date);
        dest.writeString(this.created_at);
        dest.writeParcelable(this.attached, 0);
        dest.writeList(this.ext);
    }

    public LiuhecaiTrendResponse() {
    }

    protected LiuhecaiTrendResponse(Parcel in) {
        this.id = in.readString();
        this.issue_no = in.readString();
        this.prize_num = in.readString();
        this.issue_date = in.readString();
        this.created_at = in.readString();
        this.attached = in.readParcelable(AttachedBean.class.getClassLoader());
        this.ext = new ArrayList<>();
        in.readList(this.ext, List.class.getClassLoader());
    }

    public static final Creator<LiuhecaiTrendResponse> CREATOR = new Creator<LiuhecaiTrendResponse>() {
        public LiuhecaiTrendResponse createFromParcel(Parcel source) {
            return new LiuhecaiTrendResponse(source);
        }

        public LiuhecaiTrendResponse[] newArray(int size) {
            return new LiuhecaiTrendResponse[size];
        }
    };
}
